"""
dict 字典 键与值之间用: 分隔
键唯一,键为索引
"""
ages = {
    #键key:值value
    "张三":18,
    "李四":23,
    "rose":19,
    "tom":24
}
print(ages)

#添加
ages["王五"] = 33
ages.setdefault("jack",14) #默认值
print(ages)

#删除
ages.pop("tom")
print(ages)

#修改
ages["jack"]=20
print(ages)

#查询
print(ages["jack"])